Optimal. Leaf size=66 \[ \frac {2 \sqrt {a} c \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}+\frac {2 a d \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {4000, 3859,
209, 3877} \begin {gather*} \frac {2 \sqrt {a} c \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}+\frac {2 a d \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 3877
Rule 4000
Rubi steps
\begin {align*} \int \sqrt {a+a \sec (e+f x)} (c+d \sec (e+f x)) \, dx &=c \int \sqrt {a+a \sec (e+f x)} \, dx+d \int \sec (e+f x) \sqrt {a+a \sec (e+f x)} \, dx\\ &=\frac {2 a d \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {(2 a c) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} c \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}+\frac {2 a d \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.34, size = 76, normalized size = 1.15 \begin {gather*} \frac {\sec \left (\frac {1}{2} (e+f x)\right ) \sqrt {a (1+\sec (e+f x))} \left (\sqrt {2} c \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {\cos (e+f x)}+2 d \sin \left (\frac {1}{2} (e+f x)\right )\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(117\) vs.
\(2(58)=116\).
time = 0.17, size = 118, normalized size = 1.79
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) c \sin \left (f x +e \right )+2 d \cos \left (f x +e \right )-2 d \right )}{f \sin \left (f x +e \right )}\) | \(118\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 159 vs.
\(2 (62) = 124\).
time = 0.54, size = 159, normalized size = 2.41 \begin {gather*} \frac {\sqrt {a} c \arctan \left ({\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \sin \left (f x + e\right ), {\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \cos \left (f x + e\right )\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.36, size = 256, normalized size = 3.88 \begin {gather*} \left [\frac {{\left (c \cos \left (f x + e\right ) + c\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) + 2 \, d \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{f \cos \left (f x + e\right ) + f}, -\frac {2 \, {\left ({\left (c \cos \left (f x + e\right ) + c\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) - d \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{f \cos \left (f x + e\right ) + f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )} \left (c + d \sec {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 193 vs.
\(2 (58) = 116\).
time = 1.15, size = 193, normalized size = 2.92 \begin {gather*} -\frac {\frac {2 \, \sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a} a d \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a} + \frac {\sqrt {-a} a c \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{{\left | a \right |}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________